Skip to content

Dev Console Aliases - #3841

Draft
jameszhang244 wants to merge 19 commits into
mainfrom
jzhang/dev-console-aliases
Draft

Dev Console Aliases#3841
jameszhang244 wants to merge 19 commits into
mainfrom
jzhang/dev-console-aliases

Conversation

@jameszhang244

@jameszhang244 jameszhang244 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What

Adds @osdk/aliases, a new package holding the alias runtime, and a browser-safe entry point so Developer Console apps can read installer-supplied configuration.

Why

Custom aliases let an app author declare env-var-style config that a Marketplace installer fills in at install time. Two problems with hosting that in @osdk/functions:

  1. @osdk/functions peer-depends on @osdk/client, so a browser app reading a JSON file inherited a client version floor. This is not theoretical: it failed npm install in a Developer Console app's build with ERESOLVE.
  2. Aliases are meant to span Functions, transforms, Slate, and Developer Console. Living inside one runtime's package misrepresents that.

@osdk/aliases has no dependencies on @osdk/client or @osdk/functions, so neither problem can recur by construction.

Public API

import { Aliases } from "@osdk/aliases/experimental";

await Aliases.initAliases();                      // once, before first read
const apiBaseUrl = Aliases.custom("apiBaseUrl");  // synchronous afterwards

Node code (Functions) keeps using the filesystem runtime, unchanged:

import { Aliases } from "@osdk/functions";   // or "@osdk/aliases/node"
Aliases.custom("myAlias");

Entry points:

Path Contents Stability
. nothing reserved for the stable API
./experimental browser runtime provisional
./node filesystem runtime unchanged, not experimental

The browser API sits behind experimental so the import path states its stability at every call site, matching @osdk/client, @osdk/react, and @osdk/react-components.

Resolution behavior

initAliases() fetches once, caches, and then serves custom() synchronously. Browsers have no synchronous network read, which is why an explicit init exists rather than matching Functions' fully synchronous shape.

Two files can supply values:

Source Carries When
.palantir/deployment.config.json installer's resolved values Marketplace-installed site
public/resources.json author's declared defaults local dev, or deployed without Marketplace

Callers do not choose. The deployment config is tried first and the declaration file is used only when it appears absent, meaning a 404 or a 200 carrying an HTML document (single-page-app hosts rewrite unknown paths to index.html). Any other failure throws instead of falling back, because on an installed site both files are served and treating an error as absence would silently serve the author's defaults in place of the installer's values. Absence detection is a heuristic and is documented as one: a proxy or authentication page can also be a 200 with markup.

Compatibility

@osdk/functions re-exports the Node runtime through a local facade at src/aliases/index.ts, so its public Aliases namespace is unchanged. The facade is a local module with explicit named re-exports for two API Extractor limitations, both documented in the file: it cannot process export * as ns from an external package, and it rejects a namespace whose target uses export *.

etc/functions.report.api.md is updated to reflect that the namespace members now resolve from @osdk/aliases/node.

Testing

pnpm turbo test           --filter=@osdk/aliases     # 99 tests
pnpm turbo typecheck      --filter=@osdk/aliases --filter=@osdk/functions
pnpm turbo transpileTypes --filter=@osdk/aliases --filter=@osdk/functions
pnpm turbo check-api      --filter=@osdk/functions
pnpm --dir packages/aliases lint
npx mrl check

transpileTypes is listed separately because typecheck runs with --emitDeclarationOnly false and so does not exercise --isolatedDeclarations; a declaration-emit error can pass typecheck and still fail the build.

Verified end to end against a Foundry stack:

  • Declared two aliases in an app's public/resources.json, deployed the site, packaged it as a Marketplace product, and installed it with overrides. The running site reads the installer's values rather than the declared defaults.
  • Upgraded the installation to a new product version. The installer's values persist, which is the reason the alias input-shape id excludes the application version.

Not yet verified: packaging an application that declares no aliases.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size Change
@osdk/api 432 B 0%
@osdk/client 30.11 kB 0%
@osdk/client/experimental 30.70 kB 0%
@osdk/client/observable 57.10 kB 0%
@osdk/oauth 6.54 kB 0%
@osdk/react 61.07 kB 0%
@osdk/react/devtools-registry 184 B 0%
@osdk/react/experimental 61.00 kB 0%
@osdk/react/platform-apis 4.07 kB 0%
@osdk/react/testing 536 B 0%
@osdk/react/experimental/admin 4.07 kB 0%
@osdk/react/experimental/aip 5.21 kB 0%
@osdk/react-components 10 B 0%
@osdk/react-components/experimental 707.14 kB 0%
@osdk/react-components/primitives 40.64 kB 0%
@osdk/react-components/experimental/action-form 277.55 kB 0%
@osdk/react-components/experimental/aip-agent-chat 16.45 kB 0%
@osdk/react-components/experimental/cbac-picker 54.23 kB 0%
@osdk/react-components/experimental/document-viewer 346.74 kB 0%
@osdk/react-components/experimental/email-viewer 21.89 kB 0%
@osdk/react-components/experimental/filter-list 132.09 kB 0%
@osdk/react-components/experimental/image-viewer 3.72 kB 0%
@osdk/react-components/experimental/markdown-renderer 44.21 kB 0%
@osdk/react-components/experimental/object-table 162.84 kB 0%
@osdk/react-components/experimental/pdf-viewer 160.40 kB 0%
@osdk/react-components/experimental/spreadsheet-viewer 106.23 kB 0%
@osdk/react-components/experimental/theme 714 B 0%
@osdk/react-components/experimental/tiff-renderer 29.59 kB 0%
@osdk/react-components/experimental/video-viewer 3.75 kB 0%
@osdk/react-components/experimental/xml-viewer 3.73 kB 0%
@osdk/widget.client-react 12.39 kB 0%

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Storybook Preview

📚 Open Storybook preview

Built from commit 8d16795.
Workflow run

github-actions Bot added a commit that referenced this pull request Aug 12, 2026
github-actions Bot added a commit that referenced this pull request Aug 12, 2026
github-actions Bot added a commit that referenced this pull request Aug 12, 2026
github-actions Bot added a commit that referenced this pull request Aug 17, 2026
@jameszhang244
jameszhang244 force-pushed the jzhang/dev-console-aliases branch from eddc41b to 4036f75 Compare August 17, 2026 21:08
github-actions Bot added a commit that referenced this pull request Aug 17, 2026
github-actions Bot added a commit that referenced this pull request Aug 17, 2026
@jameszhang244
jameszhang244 force-pushed the jzhang/dev-console-aliases branch from 1f2c995 to 892007b Compare August 17, 2026 21:36
github-actions Bot added a commit that referenced this pull request Aug 17, 2026
github-actions Bot added a commit that referenced this pull request Aug 17, 2026
github-actions Bot added a commit that referenced this pull request Aug 18, 2026
github-actions Bot added a commit that referenced this pull request Aug 18, 2026
@jameszhang244
jameszhang244 force-pushed the jzhang/dev-console-aliases branch from 7b37e6a to 163d1ab Compare August 19, 2026 16:18
github-actions Bot added a commit that referenced this pull request Aug 19, 2026
github-actions Bot added a commit that referenced this pull request Aug 19, 2026
@jameszhang244
jameszhang244 force-pushed the jzhang/dev-console-aliases branch from e5da7bc to 21fb8e7 Compare August 20, 2026 20:12
github-actions Bot added a commit that referenced this pull request Aug 20, 2026
github-actions Bot added a commit that referenced this pull request Aug 20, 2026
github-actions Bot added a commit that referenced this pull request Aug 20, 2026
github-actions Bot added a commit that referenced this pull request Aug 20, 2026
github-actions Bot added a commit that referenced this pull request Aug 21, 2026
github-actions Bot added a commit that referenced this pull request Aug 25, 2026
@jameszhang244
jameszhang244 force-pushed the jzhang/dev-console-aliases branch from 91de652 to a35139b Compare August 25, 2026 17:10
@jameszhang244
jameszhang244 force-pushed the jzhang/dev-console-aliases branch from a35139b to 8d16795 Compare August 25, 2026 17:11
github-actions Bot added a commit that referenced this pull request Aug 25, 2026
github-actions Bot added a commit that referenced this pull request Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant